package cn.zyk.config;

import cn.zyk.factory.YamlPropertySourceFactory;
import lombok.Getter;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.beans.factory.annotation.Value;

// 指定要加载的属性文件
@Configuration
@PropertySource(value = "classpath:resourcepath.yml", factory = YamlPropertySourceFactory.class)
@Getter
public class MyConfig {

    // 注入属性文件中的值
    @Value("${spring.datasource.driver-class-name}")
    private String driver;


}
